package createPattern.factoryPattern.factoryMethod;

import createPattern.factoryPattern.abstractFactory.carProduct.Car;
import createPattern.factoryPattern.factoryMethod.factory.ICarFactory;
import createPattern.factoryPattern.factoryMethod.factory.factoryImp.BugattiCarFactory;
import createPattern.factoryPattern.factoryMethod.factory.factoryImp.PorscheCarFactory;

public class Test {
	public static void main(String args[]) {
		ICarFactory factory = new BugattiCarFactory();
		Car jackCar = factory.getCar("Jack", "blue");
		jackCar.run();

		factory = new PorscheCarFactory();
		Car julyCar = factory.getCar("July", "red");
		julyCar.run();
	}
}
